using System.ComponentModel.DataAnnotations;
using StudentVideo.Shared.Components.CuForm;
using StudentVideo.Shared.Constants;
using StudentVideo.Shared.Dtos.Common;

namespace StudentVideo.Shared.Dtos.Student;

public record class StudentFindRequest: StudentBase {
   /// <summary>
   /// 学号/名称/身份证/电话
   /// </summary>
   [CuFormMate("学号/名称/身份证/电话", 1)]
   public string? Name { get; set; }

   /// <summary>
   /// 入学时间 - 时间段
   /// </summary>
   [Length(2, 2)]
   [RegularExpression(Pattern.FormatDatePattern)]
   [CuFormMate(CuFormTypeEnums.DateRange, 10)]
   public string[]? EnrollmentDateBetween { get; set; }

   /// <summary>
   /// 创建时间
   /// </summary>
   [Length(2, 2)]
   [RegularExpression(Pattern.FormatDatePattern)]
   [CuFormMate(CuFormTypeEnums.DateRange, 11)]
   public string[]? CreateTimeBetween { get; set; }

   public required PageRequest Page { get; set; }
}
